package com.scut.graduation.controller;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.scut.graduation.entity.Major;
import com.scut.graduation.service.MajorService;

/**
 * 专业名称表(Major)表控制层
 *
 * @author makejava
 * @since 2022-05-24 17:34:57
 */
@RestController
@RequestMapping("major")
public class MajorController {
    /**
     * 服务对象
     */
    @Resource
    private MajorService majorService;

    /**
     * 通过主键查询单条数据
     *
     * @param id
     *            主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public Major selectOne(Integer id) {
        return this.majorService.queryById(id);
    }

}